<template>
<div>
<table border="1" cellspacing="0" align="center">
  <tr>
    <td>年级</td>
    <td>课程</td>
  </tr>
  <tr v-for="i in classlist">
    <td>{{i.name}}</td>
    <td>
      <table>
        <tr>
          <td v-for="j in i.couser">{{j.name}}</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</div>
</template>

<script>
export default {
  name: "work_class",
    data(){
      return{
        classlist:{}
      }
    },
    methods:{
      get_classlist(){
        this.$axios.get('users/calssm/')
        .then(res=>{
          console.log(res.data)
          this.classlist=res.data.list
        })
      },
    },
    mounted() {
      this.get_classlist()
    }
}
</script>

<style scoped>

</style>
